﻿<phone:PhoneApplicationPage 
    x:Class="BootyShaker.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:adduplex="clr-namespace:AdDuplex;assembly=AdDuplex.WindowsPhone"
    xmlns:bs="clr-namespace:BootyShaker"
    toolkit:TiltEffect.IsTiltEnabled="True"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="False">
    <phone:PhoneApplicationPage.Resources>
        <Storyboard x:Name="HideMainMenu">

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MainMenu">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="MainMenu">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="-500"/>
            </DoubleAnimationUsingKeyFrames>
            <!--<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)" Storyboard.TargetName="MainMenu">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0"/>
            </DoubleAnimationUsingKeyFrames>-->
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MainMenu">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.3" Value="Visibility.Collapsed"/>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="ShowMainMenu" Completed="ShowMainMenu_Completed" >

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MainMenu">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="MainMenu">
                <EasingDoubleKeyFrame KeyTime="0" Value="-500"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <!--<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="MainMenu">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="1"/>
            </DoubleAnimationUsingKeyFrames>-->
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MainMenu">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.3" Value="Visibility.Visible"/>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="HideMainPage">

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MainPageContent">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="MainPageContent">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="-500"/>
            </DoubleAnimationUsingKeyFrames>
            <!--<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="MainPageContent">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0"/>
            </DoubleAnimationUsingKeyFrames>-->
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MainPageContent">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.3" Value="Visibility.Collapsed"/>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="ShowMainPage" Completed="ShowMainPage_Completed">

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MainPageContent">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" Storyboard.TargetName="MainPageContent">
                <EasingDoubleKeyFrame KeyTime="0" Value="-500"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
            <!--<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="MainPageContent">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="1"/>
            </DoubleAnimationUsingKeyFrames>-->
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="MainPageContent">
                <DiscreteObjectKeyFrame KeyTime="0:0:0.3" Value="Visibility.Visible"/>
            </ObjectAnimationUsingKeyFrames>
        </Storyboard>
    </phone:PhoneApplicationPage.Resources>
    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" >
        <Grid x:Name="MainPageScreen">
            <Grid.Background>
                <SolidColorBrush Color="{StaticResource PhoneAccentColor}"></SolidColorBrush>
            </Grid.Background>
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="auto"/>

            </Grid.RowDefinitions>
            <Grid x:Name="PagePlaceholder">
                <Grid.Background>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#648D8D8D" Offset="0" />
                        <GradientStop Color="#64242424" Offset="1" />
                    </LinearGradientBrush>
                </Grid.Background>
                <ProgressBar Name="progressBar" IsIndeterminate="True" Visibility="Collapsed"  ></ProgressBar>

                <Grid x:Name="grd2"  Grid.Row="0" Background="Transparent">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition></ColumnDefinition>
                        <ColumnDefinition></ColumnDefinition>
                        <ColumnDefinition></ColumnDefinition>
                        <ColumnDefinition></ColumnDefinition>
                        <ColumnDefinition></ColumnDefinition>
                        <ColumnDefinition></ColumnDefinition>
                        <ColumnDefinition></ColumnDefinition>
                        <ColumnDefinition></ColumnDefinition>
                    </Grid.ColumnDefinitions>

                    <Rectangle  Grid.Row="0"  Grid.Column="0"  >
                        <Rectangle.Fill>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#64484747" Offset="0" />
                                <GradientStop Color="#64313131" Offset="1" />
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>
                    <Rectangle   Grid.Row="0"  Grid.Column="2"  >
                        <Rectangle.Fill>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#64484747" Offset="0" />
                                <GradientStop Color="#64313131" Offset="1" />
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>
                    <Rectangle   Grid.Row="0"  Grid.Column="4"  >
                        <Rectangle.Fill>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#64484747" Offset="0" />
                                <GradientStop Color="#64313131" Offset="1" />
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>
                    <Rectangle   Grid.Row="0"  Grid.Column="6"  >
                        <Rectangle.Fill>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#64484747" Offset="0" />
                                <GradientStop Color="#64313131" Offset="1" />
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>
                </Grid>
                <Grid Margin="-100,-100,-100,-100" IsHitTestVisible="False">
                    <Grid.Background>
                        <RadialGradientBrush>
                            <GradientStop Color="#00ED8383" Offset="0" />
                            <GradientStop Color="#00BF6D6D" Offset="0.5" />
                            <GradientStop Color="#C8654141" Offset="1" />
                        </RadialGradientBrush>
                    </Grid.Background>
                </Grid>
                <Grid x:Name="MainPageContent" Background="Transparent">
                    <Grid.RenderTransform>
                        <TranslateTransform/>
                    </Grid.RenderTransform>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>



                    <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,0" >
                        <TextBlock  x:Name="PgTitle" Text="BootyShaker" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" Opacity="0.7" FontStretch="Normal" FontStyle="Normal" FontWeight="ExtraBold" FontFamily="Tahoma" FontSize="64" Foreground="White">

                        </TextBlock>

                    </StackPanel>
                    <Grid x:Name="MenuPlaceholder" Grid.Row="1" >
                        <!--ContentPanel - place additional content here-->
                        <Grid Grid.Row="1"  x:Name="MainMenu">
                            <Grid.RenderTransform>
                                <TranslateTransform/>
                            </Grid.RenderTransform>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <ScrollViewer     ScrollViewer.VerticalScrollBarVisibility="Visible" Margin="0,0,0,10">
                                <StackPanel>
                                    <Grid   HorizontalAlignment="Left" Margin="0,0,10,0">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition/>
                                            <ColumnDefinition/>
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="Auto"/>
                                        </Grid.RowDefinitions>
                                        <!--<TextBlock Grid.Row="0" Grid.Column="0"
                                   Grid.ColumnSpan="2"
                                   TextWrapping="Wrap"
                                   Margin="12,0,0,12">
                            The HubTile control represents an animated tile that supports an image and a title.
                            On the back, it can display either a message or a notification.
                </TextBlock>-->
                                        <StackPanel x:Name="TextPanel1" Grid.Row="0" Margin="12,17,0,0" Grid.ColumnSpan="2" Opacity="0.7">
                                            <Border   >
                                                <Border.Background>
                                                    <SolidColorBrush Color="{StaticResource PhoneAccentColor}"></SolidColorBrush>
                                                </Border.Background>
                                                <TextBlock x:Name="CreateNew" Text="Create new" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle2Style}" Foreground="White" />
                                            </Border>
                                        </StackPanel>
                                        <bs:TiltableControl Grid.Row="1" Grid.Column="0"  >
                                            <toolkit:HubTile Name="CameraTile" 
                                          
                                                 Margin="12,12,0,0"
                                                 Source="/BootyShaker;component/Images/Camera_transp.png"
                                                toolkit:TiltEffect.SuppressTilt="True"
                                                 Title="Camera"
                                                 GroupTag="MenuTiles" Tap="OpenCamera"  Background="{StaticResource PhoneAccentBrush}"/>
                                        </bs:TiltableControl>
                                        <bs:TiltableControl Grid.Row="1" Grid.Column="1" >
                                            <toolkit:HubTile Name="GalleryTile" 
                                                 Margin="12,12,0,0"
                                                 Source="/BootyShaker;component/Images/gallery_transp.png"
                                                 FontSize="13"
                                                 toolkit:TiltEffect.SuppressTilt="True"
                                                 Title="Gallery"
                                                 GroupTag="MenuTiles" Tap="OpenGallery" Background="{StaticResource PhoneAccentBrush}" />
                                        </bs:TiltableControl>
                                        <StackPanel x:Name="TextPanel2" Grid.Row="2" Margin="12,17,0,0" Grid.ColumnSpan="2" Opacity="0.7">
                                            <Border  >
                                                <Border.Background>
                                                    <SolidColorBrush Color="{StaticResource PhoneAccentColor}"></SolidColorBrush>
                                                </Border.Background>
                                                <TextBlock x:Name="LoadProject" Text="Load project" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle2Style}" Foreground="White" />
                                            </Border>
                                        </StackPanel>

                                    </Grid>
                                    <Grid  Margin="12,12,12,0" Grid.Row="0" x:Name="TilesLoadingBar" VerticalAlignment="Top">
                                        <Grid.RowDefinitions>
                                            <RowDefinition/>
                                            <RowDefinition/>
                                        </Grid.RowDefinitions>
                                        <TextBlock  FontSize="20" TextAlignment="Center" VerticalAlignment="Top">loading...</TextBlock>
                                        <Rectangle Grid.Row="0" Grid.RowSpan="2" RenderTransformOrigin="0.5,0.5"  Opacity="0.7">
                                            <Rectangle.Fill>
                                                <SolidColorBrush Color="{StaticResource PhoneAccentColor}"></SolidColorBrush>
                                            </Rectangle.Fill>
                                        </Rectangle>
                                        <!--<ProgressBar x:Name="_Timer" Height="28" VerticalAlignment="Center" Value="35" Foreground="{StaticResource PhoneForegroundBrush}" />-->
                                        <Rectangle Grid.Row="1" Height="10" Margin="5"  Fill="White" RenderTransformOrigin="0,0" >
                                            <Rectangle.RenderTransform>
                                                <ScaleTransform x:Name="TilesProgressTransform"/>
                                            </Rectangle.RenderTransform>
                                        </Rectangle>

                                    </Grid>

                                    <TextBlock x:Name="txtNoItems" Margin="20,50,20,20" FontSize="25" TextAlignment="Center" VerticalAlignment="Top" Visibility="Collapsed">No saved items...</TextBlock>

                                    <ListBox Margin="0,12,12,0" Width="370" ScrollViewer.VerticalScrollBarVisibility="Disabled" x:Name="lbTiles" ItemsSource="{Binding Items}"  VerticalContentAlignment="Top" HorizontalContentAlignment="Right">
                                        <ListBox.ItemsPanel>
                                            <ItemsPanelTemplate>
                                                <toolkit:WrapPanel ItemHeight="185" ItemWidth="185" />
                                            </ItemsPanelTemplate>
                                        </ListBox.ItemsPanel>
                                        <ListBox.ItemTemplate>
                                            <DataTemplate>
                                                <toolkit:HubTile Grid.Row="0" Grid.Column="0" 
                                         Margin="12,12,0,0"
                                         Source="{Binding ImageSource}"
                                         Title="{Binding ProjectName}"
                                         Tag="{Binding FileName}"
                                         DisplayNotification="True"
                                         FontSize ="10"
                                         FontStretch ="Condensed"
                                         Tap="ht_Tap"
                                         GroupTag="MenuTiles"  Background="{StaticResource PhoneAccentBrush}">
                                                    <toolkit:ContextMenuService.ContextMenu>
                                                        <toolkit:ContextMenu >
                                                            <toolkit:MenuItem Header="Delete" Tap="menuItemDelete_Click" />
                                                        </toolkit:ContextMenu>
                                                    </toolkit:ContextMenuService.ContextMenu>
                                                </toolkit:HubTile>
                                                <!--<Grid x:Name="LayoutRoot" Tap="PictureTile_Tap"  VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="12,0,0,12" >
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="7*"/>
                                        <ColumnDefinition Width="3*"/>
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="3*"/>
                                        <RowDefinition Height="7*"/>
                                    </Grid.RowDefinitions>
                                    <Image x:Name="folderImage" Source="{Binding ImageSource}" Grid.RowSpan="2" Grid.ColumnSpan="2" x:FieldModifier="public" VerticalAlignment="Center" HorizontalAlignment="Center"  Stretch="UniformToFill"   />
                                    <Grid Grid.Column="1" Grid.Row="0" Visibility="{Binding Include}" x:Name="MarkAdded" x:FieldModifier="public" IsHitTestVisible="False" >
                                        <Ellipse x:Name="added" Fill="#FF90B447" Stretch="Uniform"/>
                                        <Image Source="../images/add.png" Stretch="Uniform" VerticalAlignment="Top" HorizontalAlignment="Right"/>
                                    </Grid>

                                </Grid>-->
                                                <!--<Image  Height="120" Width="120" HorizontalAlignment="Center" VerticalAlignment="Center"/>-->


                                            </DataTemplate>
                                        </ListBox.ItemTemplate>
                                    </ListBox>
                                    <!--<Grid Name="TileGrid"   HorizontalAlignment="Left" Margin="0,0,10,0">

                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>

                        <toolkit:HubTile Grid.Row="0" Grid.Column="0" 
                                         Margin="12,12,0,0"
                                         Source="ApplicationIcon.png"
                                         Title="Pretzel"
                                        
                                         DisplayNotification="True"
                                         GroupTag="MenuTiles"  Background="#FF86304B" />
                        <toolkit:HubTile Grid.Row="0" Grid.Column="1" 
                                         Margin="12,12,0,0"
                                        
                                         Title="Shrimp"
                                        
                                         GroupTag="MenuTiles"  Background="#FF86304B" FontSize="{StaticResource PhoneFontSizeSmall}" />
                    </Grid>
                    <Border Name="overlayLoading"  Grid.ColumnSpan="2 " Grid.RowSpan="2" Background="#756F4060" Margin="12,12,10,0" Height="380">
                        <TextBlock Foreground="White" Text="Loading..."    FontSize="40" Margin="0" HorizontalAlignment="Center" Padding="0" TextAlignment="Center" VerticalAlignment="Center" />
                    </Border>-->
                                </StackPanel>
                            </ScrollViewer>
                            <StackPanel Grid.Column="2" x:Name="ButtonsPanel" Margin="12,12,12,12" >
                                <Image  Margin="0,30,0,5" Name="btnHelp" Stretch="None" Source="/BootyShaker;component/Icons/question.png" Tap="imgHelp_Tap" />
                                <TextBlock Foreground="White"  Text="Help"  FontSize="12" TextAlignment="Center"/>
                                <Image  Margin="0,30,0,5" Name="btnAbout" Stretch="None" Source="/BootyShaker;component/Icons/about.png" Tap="btnAbout_Click" />
                                <TextBlock Foreground="White"  Text="About"  FontSize="12" TextAlignment="Center"/>
                                <Image  Margin="0,30,0,5" Name="btnRate" Stretch="None" Source="/BootyShaker;component/Icons/rate.png" Tap="btnRate_Click" />
                                <TextBlock Foreground="White"  Text="Rate"  FontSize="12" TextAlignment="Center"/>
                                <Image Margin="0,30,0,5"  Name="btnBuy" Stretch="None" Source="/BootyShaker;component/Icons/cart.png" Tap="btnBuy_Click" />
                                <TextBlock Foreground="White" Name="txtBuy" Text="Buy"  FontSize="12" TextAlignment="Center"/>
                                <Image  Margin="0,30,0,5" Name="btnFacebook" Stretch="None" Source="/BootyShaker;component/Icons/facebook.png" Tap="btnFacebook_Click" />
                                <TextBlock Foreground="White"  Text="Facebook"  FontSize="12" TextAlignment="Center"/>

                                <!--<Button Content="Help" Height="120" Name="button1" Width="110"
                      BorderBrush="Transparent" VerticalAlignment="Bottom" FontSize="12" VerticalContentAlignment="Bottom" Click="button1_Click" HorizontalAlignment="Center" Foreground="White">
                    <Button.Background>
                        <ImageBrush ImageSource="/BootyShaker;component/Icons/question.png" Stretch="None" />
                    </Button.Background>
                </Button>
                <Button Content="About" Height="120" Name="btnAbout" Width="110"
                      BorderBrush="Transparent" VerticalAlignment="Bottom" FontSize="12" VerticalContentAlignment="Bottom" Click="btnAbout_Click" HorizontalAlignment="Center">
                    <Button.Background>
                        <ImageBrush ImageSource="/BootyShaker;component/Icons/about.png" Stretch="None" />
                    </Button.Background>
                </Button>
                <Button Content="Rate" Height="120" Name="btnRate" Width="110"
                      BorderBrush="Transparent" VerticalAlignment="Bottom" FontSize="12" VerticalContentAlignment="Bottom" Click="btnRate_Click" HorizontalAlignment="Center">
                    <Button.Background>
                        <ImageBrush ImageSource="/BootyShaker;component/Icons/rate.png" Stretch="None" />
                    </Button.Background>
                </Button>
                <Button Content="Buy" Height="120" Name="btnBuy" Width="110"
                      BorderBrush="Transparent" VerticalAlignment="Bottom" FontSize="12" VerticalContentAlignment="Bottom" Click="button2_Click" HorizontalAlignment="Center">
                    <Button.Background>
                        <ImageBrush ImageSource="/BootyShaker;component/Icons/cart.png" Stretch="None" />
                    </Button.Background>
                </Button>
                <Button Content="Facebook" Height="120" Name="btnFacebook" Width="110"
                      BorderBrush="Transparent" VerticalAlignment="Bottom" FontSize="12" VerticalContentAlignment="Bottom" HorizontalAlignment="Center" Click="btnFacebook_Click">
                    <Button.Background>
                        <ImageBrush ImageSource="/BootyShaker;component/Icons/facebook.png" Stretch="None" />
                    </Button.Background>
                </Button>-->

                            </StackPanel>
                        </Grid>
                    </Grid>

                </Grid>

            </Grid>
            <adduplex:AdControl  Grid.Row="1" x:Name="AdDuplex" 
                    AppId="10811" />
        </Grid>
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>